# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=ukui-window-switch
pkgver=3.0.1
pkgrel=9
pkgdesc="Front of the window switcher in UKUI desktop environment"
arch=('loong64' 'x86_64')
license=('GPL')
url="https://github.com/ukui/ukui-window-switch"
groups=('ukui')
depends=('gsettings-qt' 'kglobalaccel' 'libwnck3' 'qt5-x11extras' 'ukwm')
makedepends=('qt5-tools')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ukui/ukui-window-switch/archive/v$pkgver.tar.gz"
         no-kwayland.patch)
sha512sums=('f90a5e554741fe0461483e37205016f64a52d970d580b5f90521cb2ac8f0d66927f57999b059d203e2cec5704de6147feb86bc2a681627d05a4fa372033341bc'
            'ddf5036ad31c4131053c67f2f0473c67f3735002226a4bb90e6e752b095ad7b2d036a614525b1bc54082928ebda94b8193f738d0ef4184d7aaa08ad0d5a9f395')

prepare() {
  cd ukui-window-switch-$pkgver
  patch -p1 -i ../no-kwayland.patch # Drop unused kwayland dependencies
}

build() {
  cd ukui-window-switch-$pkgver
  qmake-qt5 PREFIX=/usr
  make
}

package() {
  cd ukui-window-switch-$pkgver
  make INSTALL_ROOT="$pkgdir" install
}
